home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / text / DefaultStyledDocument$ElementSpec.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  2.3 KB  |  98 lines

  1. package javax.swing.text;
  2.  
  3. public class DefaultStyledDocument$ElementSpec {
  4.    public static final short StartTagType = 1;
  5.    public static final short EndTagType = 2;
  6.    public static final short ContentType = 3;
  7.    public static final short JoinPreviousDirection = 4;
  8.    public static final short JoinNextDirection = 5;
  9.    public static final short OriginateDirection = 6;
  10.    public static final short JoinFractureDirection = 7;
  11.    private AttributeSet attr;
  12.    private int len;
  13.    private short type;
  14.    private short direction;
  15.    private int offs;
  16.    private char[] data;
  17.  
  18.    public DefaultStyledDocument$ElementSpec(AttributeSet var1, short var2) {
  19.       this(var1, var2, (char[])null, 0, 0);
  20.    }
  21.  
  22.    public DefaultStyledDocument$ElementSpec(AttributeSet var1, short var2, int var3) {
  23.       this(var1, var2, (char[])null, 0, var3);
  24.    }
  25.  
  26.    public DefaultStyledDocument$ElementSpec(AttributeSet var1, short var2, char[] var3, int var4, int var5) {
  27.       this.attr = var1;
  28.       this.type = var2;
  29.       this.data = var3;
  30.       this.offs = var4;
  31.       this.len = var5;
  32.       this.direction = 6;
  33.    }
  34.  
  35.    public char[] getArray() {
  36.       return this.data;
  37.    }
  38.  
  39.    public AttributeSet getAttributes() {
  40.       return this.attr;
  41.    }
  42.  
  43.    public short getDirection() {
  44.       return this.direction;
  45.    }
  46.  
  47.    public int getLength() {
  48.       return this.len;
  49.    }
  50.  
  51.    public int getOffset() {
  52.       return this.offs;
  53.    }
  54.  
  55.    public short getType() {
  56.       return this.type;
  57.    }
  58.  
  59.    public void setDirection(short var1) {
  60.       this.direction = var1;
  61.    }
  62.  
  63.    public void setType(short var1) {
  64.       this.type = var1;
  65.    }
  66.  
  67.    public String toString() {
  68.       String var1 = "??";
  69.       String var2 = "??";
  70.       switch (this.type) {
  71.          case 1:
  72.             var1 = "StartTag";
  73.             break;
  74.          case 2:
  75.             var1 = "EndTag";
  76.             break;
  77.          case 3:
  78.             var1 = "Content";
  79.       }
  80.  
  81.       switch (this.direction) {
  82.          case 4:
  83.             var2 = "JoinPrevious";
  84.             break;
  85.          case 5:
  86.             var2 = "JoinNext";
  87.             break;
  88.          case 6:
  89.             var2 = "Originate";
  90.             break;
  91.          case 7:
  92.             var2 = "Fracture";
  93.       }
  94.  
  95.       return var1 + ":" + var2 + ":" + this.getLength();
  96.    }
  97. }
  98.